package com.oocl.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;

import com.oocl.constant.LogLevel;

public class ResourceReleaser {
	
	public static void release(PrintWriter out,BufferedReader in,Socket socket){
		try {
			if(null!=out){
				out.close();
			}
			if(null!=in){
				in.close();
			}
			if(null != socket){
				socket.close();
			}
		} catch (IOException e) {
			LogUtil.log("IOException!"+e.getMessage(), LogLevel.ERROR);
		}
	}
}
